/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
*/
package meta

import (
	"github.com/rs/zerolog/log"
	"github.com/spf13/cobra"
	"satellite/app/meta"
)

// showCmd represents the mgrMeta command
var showCmd = &cobra.Command{
	Use:   "show",
	Short: "获取mgr的meta资源",
	Long:  `获取mgr的meta资源`,
	Args:  Args,
	Run: func(cmd *cobra.Command, args []string) {
		s := meta.NewShow(showOption).WithBase(base)
		err := s.Run()
		if err != nil {
			log.Warn().Err(err).Send()
		}
	},
}
var (
	showOption = new(meta.ShowOption)
)

func init() {
	metaCmd.AddCommand(showCmd)
	showCmd.Flags().BoolVarP(&showOption.EnableWatch, "watch", "w", false, "启用资源观察模式")
}
